3.6.66 \(\int \frac {A+B x}{x (a^2+2 a b x+b^2 x^2)^2} \, dx\)

Optimal. Leaf size=72 \[ -\frac {A \log (a+b x)}{a^4}+\frac {A \log (x)}{a^4}+\frac {A}{a^3 (a+b x)}+\frac {A}{2 a^2 (a+b x)^2}+\frac {A b-a B}{3 a b (a+b x)^3} \]

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {27, 77} \begin {gather*} \frac {A}{a^3 (a+b x)}+\frac {A}{2 a^2 (a+b x)^2}-\frac {A \log (a+b x)}{a^4}+\frac {A \log (x)}{a^4}+\frac {A b-a B}{3 a b (a+b x)^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*x)/(x*(a^2 + 2*a*b*x + b^2*x^2)^2),x]

[Out]

(A*b - a*B)/(3*a*b*(a + b*x)^3) + A/(2*a^2*(a + b*x)^2) + A/(a^3*(a + b*x)) + (A*Log[x])/a^4 - (A*Log[a + b*x]
)/a^4

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rubi steps

\begin {align*} \int \frac {A+B x}{x \left (a^2+2 a b x+b^2 x^2\right )^2} \, dx &=\int \frac {A+B x}{x (a+b x)^4} \, dx\\ &=\int \left (\frac {A}{a^4 x}+\frac {-A b+a B}{a (a+b x)^4}-\frac {A b}{a^2 (a+b x)^3}-\frac {A b}{a^3 (a+b x)^2}-\frac {A b}{a^4 (a+b x)}\right ) \, dx\\ &=\frac {A b-a B}{3 a b (a+b x)^3}+\frac {A}{2 a^2 (a+b x)^2}+\frac {A}{a^3 (a+b x)}+\frac {A \log (x)}{a^4}-\frac {A \log (a+b x)}{a^4}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 65, normalized size = 0.90 \begin {gather*} \frac {\frac {a \left (-2 a^3 B+11 a^2 A b+15 a A b^2 x+6 A b^3 x^2\right )}{b (a+b x)^3}-6 A \log (a+b x)+6 A \log (x)}{6 a^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x)/(x*(a^2 + 2*a*b*x + b^2*x^2)^2),x]

[Out]

((a*(11*a^2*A*b - 2*a^3*B + 15*a*A*b^2*x + 6*A*b^3*x^2))/(b*(a + b*x)^3) + 6*A*Log[x] - 6*A*Log[a + b*x])/(6*a
^4)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {A+B x}{x \left (a^2+2 a b x+b^2 x^2\right )^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(A + B*x)/(x*(a^2 + 2*a*b*x + b^2*x^2)^2),x]

[Out]

IntegrateAlgebraic[(A + B*x)/(x*(a^2 + 2*a*b*x + b^2*x^2)^2), x]

________________________________________________________________________________________

fricas [B]  time = 0.44, size = 156, normalized size = 2.17 \begin {gather*} \frac {6 \, A a b^{3} x^{2} + 15 \, A a^{2} b^{2} x - 2 \, B a^{4} + 11 \, A a^{3} b - 6 \, {\left (A b^{4} x^{3} + 3 \, A a b^{3} x^{2} + 3 \, A a^{2} b^{2} x + A a^{3} b\right )} \log \left (b x + a\right ) + 6 \, {\left (A b^{4} x^{3} + 3 \, A a b^{3} x^{2} + 3 \, A a^{2} b^{2} x + A a^{3} b\right )} \log \relax (x)}{6 \, {\left (a^{4} b^{4} x^{3} + 3 \, a^{5} b^{3} x^{2} + 3 \, a^{6} b^{2} x + a^{7} b\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x/(b^2*x^2+2*a*b*x+a^2)^2,x, algorithm="fricas")

[Out]

1/6*(6*A*a*b^3*x^2 + 15*A*a^2*b^2*x - 2*B*a^4 + 11*A*a^3*b - 6*(A*b^4*x^3 + 3*A*a*b^3*x^2 + 3*A*a^2*b^2*x + A*
a^3*b)*log(b*x + a) + 6*(A*b^4*x^3 + 3*A*a*b^3*x^2 + 3*A*a^2*b^2*x + A*a^3*b)*log(x))/(a^4*b^4*x^3 + 3*a^5*b^3
*x^2 + 3*a^6*b^2*x + a^7*b)

________________________________________________________________________________________

giac [A]  time = 0.15, size = 71, normalized size = 0.99 \begin {gather*} -\frac {A \log \left ({\left | b x + a \right |}\right )}{a^{4}} + \frac {A \log \left ({\left | x \right |}\right )}{a^{4}} + \frac {6 \, A a b^{3} x^{2} + 15 \, A a^{2} b^{2} x - 2 \, B a^{4} + 11 \, A a^{3} b}{6 \, {\left (b x + a\right )}^{3} a^{4} b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x/(b^2*x^2+2*a*b*x+a^2)^2,x, algorithm="giac")

[Out]

-A*log(abs(b*x + a))/a^4 + A*log(abs(x))/a^4 + 1/6*(6*A*a*b^3*x^2 + 15*A*a^2*b^2*x - 2*B*a^4 + 11*A*a^3*b)/((b
*x + a)^3*a^4*b)

________________________________________________________________________________________

maple [A]  time = 0.05, size = 72, normalized size = 1.00 \begin {gather*} \frac {A}{3 \left (b x +a \right )^{3} a}-\frac {B}{3 \left (b x +a \right )^{3} b}+\frac {A}{2 \left (b x +a \right )^{2} a^{2}}+\frac {A}{\left (b x +a \right ) a^{3}}+\frac {A \ln \relax (x )}{a^{4}}-\frac {A \ln \left (b x +a \right )}{a^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)/x/(b^2*x^2+2*a*b*x+a^2)^2,x)

[Out]

1/3/a/(b*x+a)^3*A-1/3/b/(b*x+a)^3*B-A*ln(b*x+a)/a^4+A/a^3/(b*x+a)+1/2*A/a^2/(b*x+a)^2+A*ln(x)/a^4

________________________________________________________________________________________

maxima [A]  time = 0.59, size = 91, normalized size = 1.26 \begin {gather*} \frac {6 \, A b^{3} x^{2} + 15 \, A a b^{2} x - 2 \, B a^{3} + 11 \, A a^{2} b}{6 \, {\left (a^{3} b^{4} x^{3} + 3 \, a^{4} b^{3} x^{2} + 3 \, a^{5} b^{2} x + a^{6} b\right )}} - \frac {A \log \left (b x + a\right )}{a^{4}} + \frac {A \log \relax (x)}{a^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x/(b^2*x^2+2*a*b*x+a^2)^2,x, algorithm="maxima")

[Out]

1/6*(6*A*b^3*x^2 + 15*A*a*b^2*x - 2*B*a^3 + 11*A*a^2*b)/(a^3*b^4*x^3 + 3*a^4*b^3*x^2 + 3*a^5*b^2*x + a^6*b) -
A*log(b*x + a)/a^4 + A*log(x)/a^4

________________________________________________________________________________________

mupad [B]  time = 1.11, size = 84, normalized size = 1.17 \begin {gather*} \frac {\frac {11\,A\,b-2\,B\,a}{6\,a\,b}+\frac {5\,A\,b\,x}{2\,a^2}+\frac {A\,b^2\,x^2}{a^3}}{a^3+3\,a^2\,b\,x+3\,a\,b^2\,x^2+b^3\,x^3}-\frac {2\,A\,\mathrm {atanh}\left (\frac {2\,b\,x}{a}+1\right )}{a^4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x)/(x*(a^2 + b^2*x^2 + 2*a*b*x)^2),x)

[Out]

((11*A*b - 2*B*a)/(6*a*b) + (5*A*b*x)/(2*a^2) + (A*b^2*x^2)/a^3)/(a^3 + b^3*x^3 + 3*a*b^2*x^2 + 3*a^2*b*x) - (
2*A*atanh((2*b*x)/a + 1))/a^4

________________________________________________________________________________________

sympy [A]  time = 0.53, size = 90, normalized size = 1.25 \begin {gather*} \frac {A \left (\log {\relax (x )} - \log {\left (\frac {a}{b} + x \right )}\right )}{a^{4}} + \frac {11 A a^{2} b + 15 A a b^{2} x + 6 A b^{3} x^{2} - 2 B a^{3}}{6 a^{6} b + 18 a^{5} b^{2} x + 18 a^{4} b^{3} x^{2} + 6 a^{3} b^{4} x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x/(b**2*x**2+2*a*b*x+a**2)**2,x)

[Out]

A*(log(x) - log(a/b + x))/a**4 + (11*A*a**2*b + 15*A*a*b**2*x + 6*A*b**3*x**2 - 2*B*a**3)/(6*a**6*b + 18*a**5*
b**2*x + 18*a**4*b**3*x**2 + 6*a**3*b**4*x**3)

________________________________________________________________________________________